<template>
  <div class="anli">
      Zizizizi--------{{zitext}}
      <hr>
      <button @click="fun()">点我逆向传值</button>
      <hr/>
       <button @click="bro()">点我传值给zi2</button>
       <hr>
       <p>keep-alive 展示</p>
       <input type="text">
       <input type="text">
       <input type="text">
       <hr>
  </div>
</template>

<script>
import Eventbus from "@/eventBus"
export default {
    data(){
       return{
           hddd:"逆传值演示",
       }
    },
    props:["zitext"],
    methods:{
        fun(){
            this.$emit("nchuanzhi",this.hddd)
        },
        bro(){
            Eventbus.$emit("bro","兄弟传值演示！！！！！")
        },
    },
    activated(){
        console.log("进入keep-alive")
    },
    deactivated(){
        console.log("离开keep-alive")
    }
}
</script>

<style scoped>
   .anli{
       height: 1.5rem;
   }
</style>